import axios from '~/axios'
import { joinPramas } from './manager'

// 部门

// 新增
export function api_department_add(jsonData) {
    let url = '/api/sys/dept/add'
    return axios.post(url, jsonData)
}

// 更新
export function api_department_update(id, jsonData) {
    let url = '/api/sys/dept/edit'
    jsonData.id = id
    return axios.post(url, jsonData)
}

// 删除
export function api_department_delete(id) {
    let url = '/api/sys/dept/delete/' + id
    return axios.post(url, {})
}

// 获取树
export function api_department_tree() {
    let url = '/api/sys/dept/tree'
    return axios.get(url)
}